package com.vision.util.http;

import org.apache.http.Header;
import org.apache.http.client.methods.CloseableHttpResponse;

import java.io.IOException;

/**
 * @author zhongchao
 * @title
 * @date 2017-08-22
 * @since v1.0.0
 */
public abstract class AbsRequestDeal<T> {

    protected Header[] responseHeaders;

    protected T resopnseString;

    public abstract void onSuccess(CloseableHttpResponse response) throws IOException;

    public abstract void onException(String url, Exception e);

    public abstract void onFiled();

    public T getResopnse() {
        return resopnseString;
    }

    public Header[] getResponseHeaders() {
        return responseHeaders;
    }
}
